import { useGetLessonById } from "@/entities/lesson/model/useGetLessonById"
import { UiHeader } from "@/shared/Uikit/UiHeader"
import { UiSpinner } from "@/shared/Uikit/UiSpinner"
import LessonContent from "@/widget/LessonContent/ui/LessonContent"
import { usePathname } from "next/navigation"
import { useEffect } from "react"

export default function Lesson({ params }: { params: { lessonId: number } }) {
    const lessonId = params.lessonId
    const pathname = usePathname()
    return (
        <>
            <UiHeader
                title="Урок"
                backButton
                backUrl={`${pathname?.slice(0, pathname.indexOf('lesson'))}`}
            />
            <LessonContent lessonId={lessonId} editable={false} />

        </>
    )
}
